Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding dynamic stream delay to OBS #11756

Conversation

scottsdevelopment
Copy link

Title: Question Regarding Experimental Blank Frame Generation in OBS Delay Mode

Hi OBS Community,

I'm working on a feature for OBS Studio that generates blank audio and video frames during delay mode to ensure seamless playback when live data is unavailable. The code is still untested and experimental, and I'd appreciate some guidance or insights from the community to ensure stability and compatibility with OBS's architecture.

Here’s a brief overview of what I’m attempting:

  1. Blank Video Frames:

    • Zero-filled data to represent a black frame.
    • Dynamically sized based on the video output's resolution.
  2. Silent Audio Packets:

    • Filled with zeroes to create silence.
    • Supports multiple sample rates and channel configurations.
  3. Integration:

    • These blank frames are pushed into the delay queue when gaps are detected to maintain consistency.

My Questions:

  1. This approach does not fully work, so I have commented out the filling of the blank frames, as it crashes during the interleave packets discarding audio frames due to idx being 0. I didn't spent a lot of time debugging as I would hope someone would be able to assist with this feature or point me in the right direction.
  2. Does this approach align with OBS's internal data flow for audio and video processing?
  3. Are there any best practices for memory allocation and lifecycle management of the generated packets?
  4. Could this cause unintended side effects when pushed into the delay queue, particularly with encoders or filters?
  5. What additional tests should I run to validate this implementation?

Any feedback or suggestions would be greatly appreciated! Since this is my first attempt at contributing to OBS, I’m eager to learn and refine this feature based on your expertise.

Thanks in advance! 😊

Add dynamic stream delay to OBS
Remove warnings as a warning to you
interface for the new feature.
@scottsdevelopment scottsdevelopment changed the title Adding dynamic stream delay to OGS for FREE Adding dynamic stream delay to OBS for FREE Jan 21, 2025
@kkartaltepe kkartaltepe changed the title Adding dynamic stream delay to OBS for FREE Adding dynamic stream delay to OBS Jan 21, 2025
@Fenrirthviti Fenrirthviti marked this pull request as draft January 21, 2025 00:30
@Fenrirthviti
Copy link
Member

PRs for experimental code is probably not the best way to ask for assistance, but instead use our Discord or Forums.

I'll leave it open for others to review, but as note in the future, if something is not ready to merge, it should likely wait to be PRed. At the very least, it should be marked as a draft.

@Fenrirthviti
Copy link
Member

Actually, on further thought I'm just going to close this as it's extremely experimental, uses a .lua script, and isn't even functional.

Please use our forums or Discord for further assistance.

Thank you!

@scottsdevelopment
Copy link
Author

PRs for experimental code is probably not the best way to ask for assistance, but instead use our Discord or Forums.

I'll leave it open for others to review, but as note in the future, if something is not ready to merge, it should likely wait to be PRed. At the very least, it should be marked as a draft.

I thought I was being ignored on Discord, maybe I should try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants